---
title: Google Drive
description: Upload, download, and list files
---

import { BlockInfoCard } from '@/components/ui/block-info-card'

<BlockInfoCard
  type="google_drive"
  color="#E0E0E0"
  icon={true}
  iconSvg={`<svg className="block-icon"
      xmlns="http://www.w3.org/2000/svg"
      viewBox="0 0 87.3 78"
      
      
      
    >
      <path
        d="m6.6 66.85 3.85 6.65c.8 1.4 1.95 2.5 3.3 3.3l13.75-23.8h-27.5c0 1.55.4 3.1 1.2 4.5z"
        fill="#0066da"
      />
      <path
        d="m43.65 25-13.75-23.8c-1.35.8-2.5 1.9-3.3 3.3l-25.4 44a9.06 9.06 0 0 0 -1.2 4.5h27.5z"
        fill="#00ac47"
      />
      <path
        d="m73.55 76.8c1.35-.8 2.5-1.9 3.3-3.3l1.6-2.75 7.65-13.25c.8-1.4 1.2-2.95 1.2-4.5h-27.502l5.852 11.5z"
        fill="#ea4335"
      />
      <path
        d="m43.65 25 13.75-23.8c-1.35-.8-2.9-1.2-4.5-1.2h-18.5c-1.6 0-3.15.45-4.5 1.2z"
        fill="#00832d"
      />
      <path
        d="m59.8 53h-32.3l-13.75 23.8c1.35.8 2.9 1.2 4.5 1.2h50.8c1.6 0 3.15-.45 4.5-1.2z"
        fill="#2684fc"
      />
      <path
        d="m73.4 26.5-12.7-22c-.8-1.4-1.95-2.5-3.3-3.3l-13.75 23.8 16.15 28h27.45c0-1.55-.4-3.1-1.2-4.5z"
        fill="#ffba00"
      />
    </svg>`}
/>

{/* MANUAL-CONTENT-START:intro */}
[Google Drive](https://drive.google.com) is Google's cloud storage and file synchronization service that allows users to store files, synchronize files across devices, and share files with others. As a core component of Google's productivity ecosystem, Google Drive offers robust storage, organization, and collaboration capabilities.

With Google Drive, you can:

- **Store files in the cloud**: Upload and access your files from anywhere with internet access
- **Organize content**: Create folders, use color coding, and implement naming conventions
- **Share and collaborate**: Control access permissions and work simultaneously on files
- **Search efficiently**: Find files quickly with Google's powerful search technology
- **Access across devices**: Use Google Drive on desktop, mobile, and web platforms
- **Integrate with other services**: Connect with Google Docs, Sheets, Slides, and third-party applications

In Sim Studio, the Google Drive integration enables your agents to interact directly with your cloud storage programmatically. This allows for powerful automation scenarios such as file management, content organization, and document workflows. Your agents can upload new files to specific folders, download existing files to process their contents, and list folder contents to navigate your storage structure. This integration bridges the gap between your AI workflows and your document management system, enabling seamless file operations without manual intervention. By connecting Sim Studio with Google Drive, you can automate file-based workflows, manage documents intelligently, and incorporate cloud storage operations into your agent's capabilities.
{/* MANUAL-CONTENT-END */}

## Usage Instructions

Integrate Google Drive functionality to manage files and folders. Upload new files, download existing ones, and list contents of folders using OAuth authentication. Supports file operations with custom MIME types and folder organization.

## Tools

### `google_drive_upload`

Upload a file to Google Drive

#### Input

| Parameter     | Type   | Required | Description                                |
| ------------- | ------ | -------- | ------------------------------------------ |
| `accessToken` | string | Yes      | The access token for the Google Drive API  |
| `fileName`    | string | Yes      | The name of the file to upload             |
| `content`     | string | Yes      | The content of the file to upload          |
| `mimeType`    | string | No       | The MIME type of the file to upload        |
| `folderId`    | string | No       | The ID of the folder to upload the file to |

#### Output

| Parameter        | Type   |
| ---------------- | ------ |
| `file`           | string |
| `name`           | string |
| `mimeType`       | string |
| `webViewLink`    | string |
| `webContentLink` | string |
| `size`           | string |
| `createdTime`    | string |
| `modifiedTime`   | string |
| `parents`        | string |

### `google_drive_download`

Download a file from Google Drive

#### Input

| Parameter     | Type   | Required | Description                               |
| ------------- | ------ | -------- | ----------------------------------------- |
| `accessToken` | string | Yes      | The access token for the Google Drive API |
| `fileId`      | string | Yes      | The ID of the file to download            |

#### Output

| Parameter        | Type   |
| ---------------- | ------ |
| `metadata`       | string |
| `name`           | string |
| `mimeType`       | string |
| `webViewLink`    | string |
| `webContentLink` | string |
| `size`           | string |
| `createdTime`    | string |
| `modifiedTime`   | string |
| `parents`        | string |

### `google_drive_list`

List files and folders in Google Drive

#### Input

| Parameter     | Type   | Required | Description                               |
| ------------- | ------ | -------- | ----------------------------------------- |
| `accessToken` | string | Yes      | The access token for the Google Drive API |
| `folderId`    | string | No       | The ID of the folder to list files from   |
| `query`       | string | No       | A query to filter the files               |
| `pageSize`    | number | No       | The number of files to return             |
| `pageToken`   | string | No       | The page token to use for pagination      |

#### Output

| Parameter        | Type   |
| ---------------- | ------ |
| `files`          | string |
| `name`           | string |
| `mimeType`       | string |
| `webViewLink`    | string |
| `webContentLink` | string |
| `size`           | string |
| `createdTime`    | string |
| `modifiedTime`   | string |
| `parents`        | string |

## Block Configuration

No configuration parameters required.

### Outputs

| Output       | Type   | Description              |
| ------------ | ------ | ------------------------ |
| `response`   | object | Output from response     |
| ↳ `content`  | string | content of the response  |
| ↳ `metadata` | json   | metadata of the response |

## Notes

- Category: `tools`
- Type: `google_drive`
